<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>	
<!DOCTYPE html>
<html>
<head>
	<link rel="stylesheet" href="../jquery/jquery.mobile-1.0a4.1.min.css" />
	<link rel="stylesheet" href="../css/site_style.css"/>
	<script type="text/javascript" src="../jquery/jquery-1.5.2.min.js"></script>
	<script type="text/javascript" src="../jqueryui/jquery-ui-1.8.11.custom.min.js"></script>
	<script type="text/javascript" src="../jquery/jquery.mobile-1.0a4.1.min.js"></script>
	<script type="text/javascript" src="../jquery/jquery.validate.js"></script>
	<script type="text/javascript"  src="site_modify.js"></script>
	<script charset="utf-8" src="http://s.map.qq.com/api/js/beta/v2.1/QQMapAPI.js"></script>	
	<style media="screen" type="text/css">
		#map {
			width: 100%;
			height: 240px;
			}
	</style>
   <script type="text/javascript">
  
   </script>
</head>
<body  onload="init()">
<div data-role="page">

	<div id="header" data-role="header" data-theme="b">
		<s:property value="site.category.categoryName"/>修改界面
			<s:if test="#session.login_user.category!=null">
	        	<a  onclick="location='listByMemberId.action'" data-icon="back" data-iconpos="notext" data-role="button" style="margin: 2px;float: right;" >添加</a> 
			 </s:if>
	 		<s:else>
	        	<a onclick="location='list.action?site.category.categoryNo=<s:property value="site.category.categoryNo"/>'"  data-role="button" data-icon="back" data-iconpos="notext" style="float: right;"  >回退</a> 
	     	 </s:else></div><!-- /header -->

	<div data-role="content">

		<form id="site_modify_form" action="modify.action" method="post" enctype="multipart/form-data" >

			<div data-role="fieldcontain">
	        	 <input type="hidden" name="siteNo"  id="siteNo" value='<s:property value="site.siteNo"/>'  readonly="readonly" />
			</div>
			
			<div data-role="fieldcontain">
				<label for="siteName" >名称:</label>
	        	 <input type="text" name="siteName" id="siteName" value='<s:property value="site.siteName"/>'  />
	             <span id="info_name" ></span>
			</div>
			<div data-role="fieldcontain">
				<label for="siteDesc">描述:</label>
				<textarea cols="20" rows="8" name="siteDesc" id="siteDesc"><s:property value="site.siteDesc"/></textarea>

			</div>
			
			<div data-role="fieldcontain">
			<fieldset data-role="controlgroup">
			     	<legend>类别:</legend>
			         <select name="categoryNo" id="categoryNo"  data-native-menu="false">
			         	<s:iterator value="siteCategoryList">
			         		<s:if test='site.category.categoryNo==categoryNo'>
			         			<option value='<s:property value="categoryNo"/>' selected><s:property value="categoryName"/></option>
			         		</s:if>
			         		<s:else>
			         		 	<option value='<s:property value="categoryNo"/>'><s:property value="categoryName"/></option>
			         		 </s:else>
			         	 </s:iterator>
			         </select>
	         </fieldset>
			</div>

			
			<div data-role="fieldcontain">
				<label for="city">城市:</label>
			 	<input type="text" name="city" id="city" value='<s:property value="site.city"/>' />
			</div>
			<div data-role="fieldcontain">
				<label for="address">地址:</label>
			 	<input type="text" name="address" id="address" value='<s:property value="site.address"/>' />
			</div>
			<div data-role="fieldcontain">
				<label for="contactName">联系人:</label>
			 	<input type="text" name="contactName" id="contactName" value='<s:property value="site.contactName"/>' />
			</div>

			<div data-role="fieldcontain">
				<label for="tel">联系电话:</label>
				<input type="text" name="tel" id="tel" value='<s:property value="site.tel"/>' />
			</div>

			<div data-role="fieldcontain">
				<label for="fax">传真:</label>
				<input type="text" name="fax" id="fax" value='<s:property value="site.fax"/>' />
			</div>
			
			<div data-role="fieldcontain">
				<label for="mobile">移动电话:</label>
				<input type="text" name="mobile" id="mobile" value='<s:property value="site.mobile"/>' />
			</div>
			<div data-role="fieldcontain">
				<label for="email">EMail:</label>
				<input type="text" name="email" id="email" value='<s:property value="site.email"/>' />
			</div>
			<div data-role="fieldcontain">
				<label for="webSite">网址:</label>
				<input type="text" name="webSite" id="webSite" value='<s:property value="site.webSite"/>' />
			</div>
			<div id="map"></div>
			<div data-role="fieldcontain">
				<label for="lng">经度:</label>
				<input type="text" name="lng" id="lng" value='<s:property value="site.lng"/>' />
				
			</div>
			<div data-role="fieldcontain">
				<label for="lat">纬度:</label>
				<input type="text" name="lat" id="lat" value='<s:property value="site.lat"/>' />
			
			</div>
			
			<div data-role="fieldcontain">
			 <fieldset data-role="controlgroup" data-type="horizontal">
			     	<legend>图片:</legend>
				<label for="photo"></label>
				<img src="../upload/<s:property value="site.photoName" />" width="80" height="80" id="show_photo" />
				<input type="hidden" id="photoName" name="photoName" value="<s:property value="site.photoName" />"/>
				<input type="file" name="photo" id="upload_photo" style="display: none;"  />
			  </fieldset>
			    
			</div>
				<div data-role="fieldcontain">
	         <fieldset data-role="controlgroup">
			     	<legend>图片处理:</legend>
	        		 <input type="hidden" id="dealPhoto" name="dealPhoto" value="save"/>
		         	<select name="radio_command" id="radio_command" data-native-menu="false"  >
		         			<option value="radio_save" >保留</option>
		         			<option  value="radio_modify">修改</option>
		         			<option value="radio_delete">删除</option>
		         	</select>
	            </fieldset>
			</div>
			
		
			<div data-role="fieldcontain">
				<fieldset data-role="controlgroup" data-type="horizontal">
			     	<legend>是否显示:</legend>
			     	<s:if test='site.showStatus=="N"'>
			     		<input type="radio" name="showStatus" id="showStatus_y" value="Y" />
			         	<label for="showStatus_y">是</label>
			         	<input type="radio" name="showStatus" id="showStatus_n" value="N" checked="checked" />
			         	<label for="showStatus_n">否</label>
			     	</s:if>
					<s:else> 
					  <input type="radio" name="showStatus" id="showStatus_y" value="Y" checked="checked"  />
			         	<label for="showStatus_y">是</label>
			         	<input type="radio" name="showStatus" id="showStatus_n" value="N" />
			         	<label for="showStatus_n">否</label>
					</s:else> 
			    </fieldset>
			</div>
			
			
		<div data-role="fieldcontain">
			<fieldset class="ui-grid-a">
				<s:if test="#session.login_user.category!=null">
	        	<div class="ui-block-a"><button type="button" onclick="location='listByMemberId.action'" data-theme="d">关闭</button></div>
			 	</s:if>
	 			<s:else>
	        	<div class="ui-block-a"><button type="button" onclick="location='list.action?site.category.categoryNo=<s:property value="site.category.categoryNo"/>'" data-theme="d">关闭</button></div>
	     	 	</s:else>
	     	 	<div class="ui-block-b"><button type="submit"  data-theme="a">修改</button></div>
	   		 </fieldset>
	   
		</div>
	</form>

	</div><!-- /content -->
</div><!-- /page -->

</body>
</html>
